package Test;

public class Test5 {
    //斐波那契数列
    //循环
    public static void main(String[] args) {
        int n=10;
        System.out.println(0);
        System.out.println(1);
        fac(n);
    }

    private static void fac(int n) {
        int f1=0;
        int f2=1;
        for (int i=3;i<=n;i++){
            int f=f1+f2;
            System.out.println(f);
            f1=f2;
            f2=f;
        }
    }

}
